package com.jilefojing.service;

import java.util.List;

import com.jilefojing.beans.enums.ProgressStatusForSource;
import com.jilefojing.beans.pojos.EArticle;
import com.jilefojing.beans.pojos.enhanced.EnhancedDCategory;
import com.jilefojing.beans.pojos.enhanced.EnhancedEArticle;
import com.jilefojing.beans.vo.Order;
import com.jilefojing.beans.vo.Pagination;
import com.jilefojing.context.beans.vo.UserContext;
import com.jilefojing.service.base.IBaseService;

/**
 * 
 * @author 作者 jgshun
 * @date 创建时间 2016年10月03日 16时03分48秒
 */
public interface IEArticleService extends IBaseService<EArticle> {

	/**
	 * 取类别的交集
	 * 
	 * @param categoryIds
	 * @param progressStatuses
	 * @param pagination
	 * @param userContext
	 * @return
	 */
	Pagination<EnhancedEArticle> getPaginationByCategoryIdsForActive(List<Long> categoryIds, List<ProgressStatusForSource> progressStatuses, Pagination<EnhancedEArticle> pagination,
			UserContext userContext);

	EnhancedEArticle appendEnhancedChildren(EnhancedEArticle enhancedEArticle, UserContext userContext);

	List<EnhancedEArticle> appendEnhancedChildren(List<EnhancedEArticle> enhancedEArticles, UserContext userContext);

	List<EnhancedEArticle> getEnhancedsByParentId(long parentId, UserContext userContext);

	List<EnhancedEArticle> getEnhancedsByParentIds(List<Long> parentIds, UserContext userContext);

	EnhancedEArticle appendEnhancedAttitudeForUser(EnhancedEArticle enhancedEArticle, UserContext userContext);

	List<EnhancedEArticle> appendEnhancedAttitudeForUser(List<EnhancedEArticle> enhancedEArticles, UserContext userContext);

	EnhancedEArticle appendEnhancedRFavoriteSourceForUser(EnhancedEArticle enhancedEArticle, UserContext userContext);

	List<EnhancedEArticle> appendEnhancedRFavoriteSourceForUser(List<EnhancedEArticle> enhancedEArticles, UserContext userContext);

	EnhancedEArticle appendEnhancedDCategories(EnhancedEArticle enhancedEArticle, UserContext userContext);

	List<EnhancedEArticle> appendEnhancedDCategories(List<EnhancedEArticle> enhancedEArticles, UserContext userContext);

	List<EnhancedDCategory> getEnhancedDCategories(UserContext userContext);

	EnhancedEArticle getEnhancedPrevInDCategory(EnhancedDCategory enhancedDCategory, long articleId, List<Order> orders, UserContext userContext);

	EnhancedEArticle getEnhancedNextInDCategory(EnhancedDCategory enhancedDCategory, long articleId, List<Order> orders, UserContext userContext);

}
